from messAround.model.hot_steam import HotSteamModel
import messAround.util.help as util


# Steam实时在线人数
class SteamOnlinePipeline(object):

    @staticmethod
    def process_item(item, spider):
        return util.make_write_data({
            'name': item["name"],
            'online': int(item["online"]),
            'online_max': int(item["online_max"]),
            'app_link': item["link"],
        }, item, HotSteamModel)


# SteamHardWare
# Steam硬件统计
class SteamHardWare(object):

    @staticmethod
    def process_item(self, item, spider):
        return item
